#[ 13 14 94 33 82 25 59 94 65 23 45 27 73 25 39 10 ]
def shellSort(li):
    n = len(li)
    gap = int(n/2)
    while gap > 0 :
        for i in range(gap,n):
            j = i
            while j>=gap and li[j - gap] > li[j]:
                li[j - gap], li[j] = li[j], li[j - gap]
                j -= gap
        gap = int(gap / 2)
li = [1,33,23,12,44,5,22,31]
shellSort(li)
print(li)